package com.edais.persistence;

import java.util.List;
import java.util.Map;

import com.edais.domain.Loan;
import com.edais.domain.Scattered;
import com.edais.vo.LoanVo;

public interface LoanMapper {

	/**
	 * 散标基本信息
	 * @param map
	 * @return
	 */
	public List<LoanVo> getLoanList(Map<String,Object> map);
	public int getLoanListSize(Map<String,Object> map);
	public List getPlanByMain(Map<String,Object> map);
	
	/**
	 * 散标详细信息
	 */
	public Map getLoanDetail(Map<String,Object> map);
	
	/**
	 * 散标详细信息 by jiangbo
	 */
	public Loan getLoanDetailByFinaceId(Map<String,Object> map);
	
	/**
	 * 借款人信息
	 */
	public Map getBorrowerInfo(Map<String,Object> map);
	
	
	/**
	 * 查询所有上架表产品信息
	 * @param map
	 * @return
	 */
	public List<Scattered> queryScatteredLoan(Map<String, Object> map);
	
	/**
	 * 查询所有上架表产品信息
	 * @param map
	 * @return
	 */
	public List<Scattered> queryScatteredLoanInfo(Map<String, Object> map);
	/**
	 * 查询所有上架表产品信息总数
	 * @return
	 */
	public String queryScatteredLoanCount(Map<String,Object> map);
	/**
	 * 查询所有上架表产品信息总数
	 * @return
	 */
	public Integer queryScatteredLoanInfoCount(Map<String,Object> map);
	
	public List getLenderMaterials(Map<String,Object> map);
	
	/**
	 * 散标详细信息 by jiangbo
	 */
	public Loan getLoanDetailByLoanId(Map<String,Object> map);
	
	/**
	 * 散标详细信息通过上架表ID by jiangbo
	 */
	public Loan getLoanDetailBySLoanId(Map<String,Object> map);
	
	public List<Scattered> queryWxAndAppLoan();
	
	public String queryBitShowNamePeriod();
	
	public String queryBitShowNameCurrent();
	
	/**
	 * 根据加息券ID的借款期数查询上架表
	 * @return
	 */
	public List<Scattered> queryScatteredByRateId(Map<String,Object> paramsMap);
	/**
	 * 根据上架散标ID查询散标信息
	 * @param paramsMap
	 * @return
	 */
	public Scattered queryScatteredByLoanId(Map<String,Object> paramsMap);
	/**
	 * 根据上架散标表ID查询计息日
	 * @param paramsMap
	 * @return
	 */
	public Integer queryScatteredLoanValueDateById(Map<String,Object> paramsMap);
	
	/**
	 * 根据代金券ID查询符合的上架表
	 * @param paramsMap
	 * @return
	 */
	public List<Scattered> queryScatteredByVouchersId(Map<String,Object> paramsMap);
	
	public String getFinishedRatio(String sloanId)throws Exception;
}
